package main

import (
	"flag"
	"iris_test/Tools"
	"iris_test/config"
	"iris_test/controllers"
	"iris_test/core"
	"os"
	"path/filepath"
)

func init() {
	dir,_ := os.Getwd()
	var path = flag.String("config", filepath.Dir(dir), "config")
	flag.Parse()
	config.Conf["config"] = *path
	Tools.InitEnv(&config.Conf)
	config.InitMongoLocalSession()
}

func main() {
	configures := make(map[string]interface{})
	configures["/"] = new(controllers.TestController)
	core.InitApp(configures)
}
